#ifndef USER_BLE_PROFILE_H
#define USER_BLE_PROFILE_H

/*
 * INCLUDES (包含头文件)
 */
#include <stdio.h>
#include <string.h>
#include "gap_api.h"
#include "gatt_api.h"
#include "gatt_sig_uuid.h"


/*
 * MACROS (宏定义)
 */

/*
 * CONSTANTS (常量定义)
 */
// Simple Profile attributes index. 
enum
{
    USER_IDX_SERVICE,

    USER_IDX_CHAR1_DECLARATION,
    USER_IDX_CHAR1_VALUE,
	  USER_IDX_CHAR_CFG,
//    USER_IDX_CHAR1_USER_DESCRIPTION,
    USER_IDX_CHAR2_DECLARATION,
    USER_IDX_CHAR2_VALUE,
//    USER_IDX_CHAR2_USER_DESCRIPTION,
    USER_IDX_NB,
};

// Simple GATT Profile Service UUID
//#define USER_SVC_UUID              0xFFD0
//#define USER_CHAR1_UUID            0xFFD1
//#define USER_CHAR2_UUID            0xFFD2

//#define USER_SVC_UUID              {0xFB, 0x34, 0x9B, 0x5F, 0x80, 0x00, 0x00, 0x80,0x00, 0x10, 0x00, 0x00, 0x17, 0xff, 0x00, 0x00}  
//#define USER_CHAR1_UUID            {0xFB, 0x34, 0x9B, 0x5F, 0x80, 0x00, 0x00, 0x80,0x00, 0x10, 0x00, 0x00, 0x04, 0xff, 0x00, 0x00}
//#define USER_CHAR2_UUID            {0xFB, 0x34, 0x9B, 0x5F, 0x80, 0x00, 0x00, 0x80,0x00, 0x10, 0x00, 0x00, 0x02, 0xff, 0x00, 0x00}

//#define USER_SVC_UUID              {0xFB, 0x34, 0x9B, 0x5F, 0x80, 0x00, 0x00, 0x80,0x00, 0x10, 0x00, 0x00, 0x01, 0xfa, 0x00, 0x00}  
//#define USER_CHAR1_UUID            {0xFB, 0x34, 0x9B, 0x5F, 0x80, 0x00, 0x00, 0x80,0x00, 0x10, 0x00, 0x00, 0x02, 0xfa, 0x00, 0x00}
//#define USER_CHAR2_UUID            {0xFB, 0x34, 0x9B, 0x5F, 0x80, 0x00, 0x00, 0x80,0x00, 0x10, 0x00, 0x00, 0x03, 0xfa, 0x00, 0x00}

#define USER_SVC_UUID              {0xFB, 0x34, 0x9B, 0x5F, 0x80, 0x00, 0x00, 0x80,0x00, 0x10, 0x00, 0x00, 0x01, 0xff, 0x00, 0x00}  // ble uuid
#define USER_CHAR1_UUID            {0xFB, 0x34, 0x9B, 0x5F, 0x80, 0x00, 0x00, 0x80,0x00, 0x10, 0x00, 0x00, 0x02, 0xff, 0x00, 0x00}
#define USER_CHAR2_UUID            {0xFB, 0x34, 0x9B, 0x5F, 0x80, 0x00, 0x00, 0x80,0x00, 0x10, 0x00, 0x00, 0x03, 0xff, 0x00, 0x00}

//#define USER_SVC_UUID				 {0xFC, 0x1A, 0x30, 0x00, 0x00, 0x00, 0x00, 0x10, 0x20, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} 
//#define USER_CHAR1_UUID      {0xFC, 0x1A, 0x30, 0x00, 0x00, 0x00, 0x00, 0x10, 0x20, 0x30, 0x00, 0x00, 0x00, 0x33, 0x00, 0x00}
//#define USER_CHAR2_UUID      {0xFC, 0x1A, 0x30, 0x00, 0x00, 0x00, 0x00, 0x10, 0x20, 0x30, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00}
//#define USER_CHAR_RX_UUID    {0xF3, 0xFA, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x02}
//#define USER_CHAR_UUID_NOTI  {0xF4, 0xFA, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x02}

void user_gatt_add_service(void);
void user_notify(uint8_t conidx,uint8_t *p_data,uint16_t len);

#endif
